package com.yami.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.enums.ShopWalletChangeReason;
import com.yami.shop.bean.model.ShopWallet;
import com.yami.shop.bean.model.ShopWalletLog;
import com.yami.shop.bean.param.CustomerReqParam;
import com.yami.shop.common.util.PageParam;

import javax.servlet.http.HttpServletResponse;

/**
 * 商家钱包记录
 *
 * @author Dwl
 * @date 2019-09-19 14:02:57
 */
public interface ShopWalletLogService extends IService<ShopWalletLog> {

    /**
     * 插入店铺钱包日志
     * @param oldShopWallet 旧的钱包记录
     * @param newShopWallet 新的钱包记录
     * @param shopWalletChangeReason 改变原因
     * @param orderNumber 订单号
     * @return
     */
    void saveShopWalletLog(ShopWallet oldShopWallet, ShopWallet newShopWallet , ShopWalletChangeReason shopWalletChangeReason, String orderNumber);

    /**
     * 分页获取商家钱包记录列表
     * @param page 分页参数
     * @param shopWalletLog 钱包日志搜索参数
     * @return 商家钱包记录列表分页数据
     */
    IPage<ShopWalletLog> pageByParam(PageParam<ShopWalletLog> page, ShopWalletLog shopWalletLog);

    /**
     * 查询所有店铺的日志
     * @param page 分页
     * @param shopWalletLog 查询参数
     * @return 所有店铺的日志
     */
    IPage<ShopWalletLog> pageAllShop(PageParam<ShopWallet> page, ShopWalletLog shopWalletLog);

    /**
     * 导出店铺日志
     * @param customerReqParam
     * @param response
     */
    void excelShopWalletLog(CustomerReqParam customerReqParam, HttpServletResponse response);
}
